package 寒假刷题;

public class 删列造序 {

    public int minDeletionSize(String[] strs) {
        int nums = 0;
        //先遍历每一列
        for (int i = 0; i < strs[0].length() ; i++) {
            for (int j = 0; j < strs.length-1; j++) {
                if (strs[j].charAt(i)>strs[j+1].charAt(i)){
                    nums++;
                    break;
                }
            }
        }
        return nums;
    }
}
